//
//  ZXInfoRequest.m
//  HONGQIYUN
//
//  Created by 余海华 on 2016/12/21.
//  Copyright © 2016年 Haidi. All rights reserved.
//

#import "ZXInfoRequest.h"


@implementation ZXInfoRequest {
    
    
    NSString *_fid;
    NSString *_page;
    NSString *_pageSize;
    NSString *_keywords;
    
}
- (id)initRequestWithFid:(NSString *) fid  andPage:(NSString *) page andPageSize:(NSString *) pageSize andKeywords:(NSString*) keywords{
    
    
    if (self = [super init]) {
        
        _fid = fid;
        _page = page;
        _pageSize = pageSize;
        _keywords = keywords;
    }
    return self;
}

-(YTKRequestMethod)requestMethod
{
    return YTKRequestMethodGET;
}

-(NSString *)requestUrl
{
    return @"/tools/getdata.ashx?types=get_news_list";
}

-(id)requestArgument
{
    return @{
             @"fid": [_fid length]?_fid:@"",
             @"page":[_page length]?_page:@"",
             @"pageSize":[_pageSize length]?_pageSize:@"",
             @"keywords":[_keywords length]?_keywords:@""
             };
}

-(NSInteger)cacheTimeInSeconds
{
    return 60*3;//为负数 不启用缓存
}

//-(NSDictionary *)requestHeaderFieldValueDictionary
//{
//    NSMutableURLRequest *request_M=(NSMutableURLRequest *)[super requestTask].currentRequest;
//    NSString *strUrl=[NSString stringWithFormat:@"%@%@",@"",[self requestUrl]];
//    NSDictionary *dict=[[HHNUtility sharedHHNInstance] setHttpHeaderWithUrl:strUrl Request:request_M];
//    
//    return dict;
//}

-(long long)cacheVersion
{
    return  1;
}
@end
